package com.ddsfec.homepageapi.service;

import com.ddsfec.homepageapi.dao.EvaluateDAO;
import com.ddsfec.homepageapi.entity.EvaluateVo;
import com.ddsfec.homepageapi.entity.ResultBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EvaluateService {

    @Resource
    EvaluateDAO evaluateDAO;

    public ResultBean checkEvaluatesByUser(String userId) {
        ResultBean<EvaluateVo> bean =new ResultBean<>();
        try{
            List<EvaluateVo> evaluateVos = evaluateDAO.checkEvaluatesByUser(userId);
            bean.setData(evaluateVos);
        }catch (Exception e){
           e.printStackTrace();
           bean.setCode(1000L);
           return bean;
        }

        return bean;
    }
}
